package com.arrogames.rgblabyrinth.game.graphics {
	import flash.display.BitmapData;
	import flash.display.Shape;
	
	import starling.display.Image;
	import starling.textures.Texture;
	
	public class BorderedBox extends Image {
		public function BorderedBox(color:uint, x:int, y:int, width:int, height:int) {
			
			var shape:Shape = new Shape();
			shape.graphics.lineStyle(1, color);
			shape.graphics.drawRect(x, y, width, height);
			
			var bitmapData:BitmapData = new BitmapData(800, 600, true, 0);
			bitmapData.draw( shape, null, null, null, null, true );
			
			var texture:Texture = Texture.fromBitmapData(bitmapData, false, false, 1);
			super(texture);
		}
	}
}